package com.guochen.debt.mapper;

import com.guochen.debt.pojo.PaymentLog;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author Guo Chen
 * @date 2022年05月14日 15:20
 */
public interface PaymentLogMapper {
    /**
     * 获取全部支付信息
     * @author Li Yaozu
     * @date 2022/5/14 15:20
     * @return java.util.List<com.guochen.debt.pojo.PaymentLog>
     */
    List<PaymentLog> getAllPaymentLog();

    /**
     * 根据id获取支付信息
     * @author Li Yaozu
     * @date 2022/5/14 15:22
     * @param id
     * @return java.util.List<com.guochen.debt.pojo.PaymentLog>
     */
    PaymentLog getPaymentLogById(@Param("id") long id);

    /**
     * 新增支付信息
     * @author Li Yaozu
     * @date 2022/5/14 15:24
     * @param paymentLog
     * @return java.lang.Integer
     */
    Integer insertPaymentLog(PaymentLog paymentLog);

    /**
     * 根据id删除支付信息
     * @author Li Yaozu
     * @date 2022/5/14 15:25
     * @param id
     * @return java.lang.Integer
     */
    Integer deletePaymentLogById(@Param("id") Integer id);

    /**
     * 更新支付信息
     * @author Li Yaozu
     * @date 2022/5/14 15:26
     * @param paymentLog
     * @return java.lang.Integer
     */
    Integer updatePaymentLog(PaymentLog paymentLog);

    /**
     * 按债务编号查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param debtId
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByDebtId(@Param("debtId") Integer debtId);

    /**
     * 按还款日期查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param payDate
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByPayDate(@Param("payDate") Date payDate);

    /**
     * 按操作员查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param userName
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByUserName(@Param("userName") String userName);

    /**
     * 按录入时间查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param applyTime
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByApplyTime(@Param("applyTime") Timestamp applyTime);

    /**
     * 按支付类型查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param type
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByType(@Param("type") long type);

    /**
     * 按支付状态查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param status
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByStatus(@Param("status") long status);

    /**
     * 按备注查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param remark
     * @return com.guochen.debt.pojo.PaymentLog
     */
    PaymentLog getPaymentLogByRemark(String remark);

//    int updatePaymentLogById(PaymentLog paymentLog);

    /**
     * 按还款金额查询
     * @author Li Yaozu
     * @date 2022/5/14 15:27
     * @param amount
     * @return com.guochen.debt.pojo.PaymentLog
     */

    PaymentLog getPaymentLogByAmount(@Param("amount") double amount);

}
